<%@ page language="java" import="java.util.*,shop.dao.*,shop.entity.*"  pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="../Style/skin.css" />
	</head>

<script type="text/javascript">
		function fun_check_form(){
			if(document.form1.title.value==""){
				alert("请输入标题。");
				return false;
			}else if(document.form1.title.value.length<5){
				alert("请输入大于5个字的标题。");
				return false;
			}else if(document.form1.contents.value==""){
				alert("请输入内容。");
				return false;
			}else if(document.form1.contents.value.length>10000){
				alert("请输入小于1万字的内容");
				return false;
			}else{
				return true;
			}
		}
		</script> 
  <body>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <!-- 头部开始 -->
            <tr>
                <td width="17" valign="top" background="../images/mail_left_bg.gif">
                    <img src="../images/left_top_right.gif" width="17" height="29" />
                </td>
                <td valign="top" background="../images/content_bg.gif">
                    <table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" background="../../images/content_bg.gif">
                        <tr><td height="31"><div class="title">添加新闻</div></td></tr>
                    </table>
                </td>
                <td width="16" valign="top" background="../images/mail_right_bg.gif"><img src="../images/nav_right_bg.gif" width="16" height="29" /></td>
            </tr>
            <!-- 中间部分开始 -->
            <tr>
                <!--第一行左边框-->
                <td valign="middle" background="../images/mail_left_bg.gif">&nbsp;</td>
                <!--第一行中间内容-->
                <td valign="top" bgcolor="#F7F8F9">
                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <!-- 空白行-->
                        <tr><td colspan="2" valign="top">&nbsp;</td><td>&nbsp;</td><td valign="top">&nbsp;</td></tr>
                        <tr>
                            <td colspan="4">
                                <table>
                                    <tr>
                                        <td width="100" align="center"><img src="../images/mime.gif" /></td>
                                        <td valign="bottom"><h3 style="letter-spacing:1px;">添加新闻，请填写相关信息<br /></h3><br /></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <!-- 一条线 -->
                        <tr>
                            <td height="40" colspan="4">
                                <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
                                    <tr><td></td></tr>
                                </table>
                            </td>
                        </tr>
                        <!-- 添加栏目开始 -->
                        <tr>
                            <td width="2%">&nbsp;</td>
                            <td width="96%">
                                <table width="100%">
                                    <tr>
                                        <td colspan="2">
                                           <form name="form1" action="do_NEWS_add.jsp" method="post"	onSubmit="return fun_check_form()">
                                                <table width="100%" class="cont">
                                                    <tr>
                                                        <td width="2%">&nbsp;</td>
                                                        <td width="10%">标题：</td>
                                                        <td ><input class="text" type="text" name="title"  style="width:800px;height:20px;resize: none;"/></td>
                                                        <td width="2%">&nbsp;</td>
                                                    </tr>
                                                    
                                                    <tr>
                                                        <td width="2%">&nbsp;</td>
                                                        <td>内容：</td>
                                                        <td><textarea name="contents" style="width:800px;height:200px;resize: none;"></textarea></td>
                                                        <td width="2%">&nbsp;</td>
                                                    </tr>
                                                    </tr>
                                                    <tr>
                                                        <td>&nbsp;</td>
                                                        <td colspan="3"><input type="submit" value="提交"
			                                            name="B1" /> &nbsp; <input type="reset" value="重置" name="B2" /></td>
                                                        <td>&nbsp;</td>
                                                    </tr>
                                                </table>
                                            </form>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td width="2%">&nbsp;</td>
                        </tr>
                        <!-- 添加栏目结束 -->
                        <tr>
                            <td height="40" colspan="4">
                                <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
                                    <tr><td></td></tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td width="2%">&nbsp;</td>
                            <td width="51%" class="left_txt">
                               <!--  <img src="../images/icon_mail.gif" width="16" height="11"> 客户服务邮箱：zhuoqiu@foxmail.com<br /> -->
                                <!-- <img src="../images/icon_phone.gif" width="17" height="14"> 官方网站：<a href="" target="_blank">卓球游戏</a>-->
                            </td>
                            <td>&nbsp;</td><td>&nbsp;</td>
                        </tr>
                    </table>
                </td>
                <td background="../images/mail_right_bg.gif">&nbsp;</td>
            </tr>
            <!-- 底部部分 -->
            <tr>
                <td valign="bottom" background="../images/mail_left_bg.gif">
                    <img src="../images/buttom_left.gif" width="17" height="17" />
                </td>
                <td background="../images/buttom_bgs.gif">
                    <img src="../images/buttom_bgs.gif" width="17" height="17">
                </td>
                <td valign="bottom" background="../images/mail_right_bg.gif">
                    <img src="../images/buttom_right.gif" width="16" height="17" />
                </td>           
            </tr>
        </table>
  </body>
</html>
